<!DOCTYPE html>
<html class="ui-page-login">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title></title>
    <script src="__PUBLIC__/js/jquery.min.js"></script>
    <script src="__PUBLIC__/home/plugins/layer/layer.js"></script>
    <script src="__PUBLIC__/mui/js/mui.min.js"></script>
    <script src="__PUBLIC__/js/angular.js"></script>
    <script src="__PUBLIC__/common.js"></script>
    <link rel="stylesheet" href="__PUBLIC__/mui/css/mui.css" />
    <style>

        #member-login{
            display: none;
        }
        .area {
            margin: 20px auto 0px auto;
        }

        .mui-input-group {
            margin-top: 10px;
        }

        .mui-input-group:first-child {
            margin-top: 20px;
        }

        .mui-input-group label {
            width: 35%;
            font-size: 15px;

        }

        .mui-input-row label~input,
        .mui-input-row label~select,
        .mui-input-row label~textarea {
            width: 65%;
            text-indent: 1em;
            color: #333333;
        }

        .mui-checkbox input[type=checkbox],
        .mui-radio input[type=radio] {
            top: 6px;
        }

        .mui-content-padded {
            margin-top: 25px;
        }

        .mui-btn {
            padding: 10px;
        }

        .link-area {
            display: block;
            margin-top: 25px;
            text-align: center;
        }

        .spliter {
            color: #bbb;
            padding: 0px 8px;
        }

        .oauth-area {
            position: absolute;
            bottom: 20px;
            left: 0px;
            text-align: center;
            width: 100%;
            padding: 0px;
            margin: 0px;
        }

        .oauth-area .oauth-btn {
            display: inline-block;
            width: 50px;
            height: 50px;
            background-size: 30px 30px;
            background-position: center center;
            background-repeat: no-repeat;
            margin: 0px 20px;
            /*-webkit-filter: grayscale(100%); */
            border: solid 1px #ddd;
            border-radius: 25px;
        }

        .oauth-area .oauth-btn:active {
            border: solid 1px #aaa;
        }

        .oauth-area .oauth-btn.disabled {
            background-color: #ddd;
        }

        .login-active {
            background: #f3363a;
        }
        .mui-input-group .enter{
            background: url("__PUBLIC__/images/enter-right.png")no-repeat;!important ;
            background-position: right 1em center;
            background-size: auto 50%;
        }
    </style>
    <link rel="stylesheet" href="__PUBLIC__/js/nice-validator-0.10.11/dist/jquery.validator.css" />
    <script src="__PUBLIC__/js/nice-validator-0.10.11/dist/jquery.validator.js"></script>
    <script src="__PUBLIC__/js/nice-validator-0.10.11/dist/local/zh-CN.js"></script>
</head>
<body ng-app="myApp" ng-controller="Ctrl" ng-cloak>
<header class="mui-bar mui-bar-nav" style="background:#f3363a;" >
    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: white"></a>
    <h1 class="mui-title login-item" style="color: white">上传身份证件</h1>
</header>
<div class="mui-content" id="user-login" ng-app="myApp" ng-controller="Ctrl">
    <form class="mui-input-group" method="post" action="" style="margin-top: 0;  background: #efeff4">
        <!--  <div class="mui-input-row enter">
                <label>身份证号</label>
             <input name='password' type="password" class="mui-input-clear mui-input">
            </div>-->
    </form>
    <div class="mui-content-padded">
        <button id="login" class="mui-btn mui-btn-block mui-btn-danger" style="line-height: 1" ng-click="upidcard()">确认上传</button>
    </div>
    <div class="mui-content-padded oauth-area">
    </div>
</div>

<script>
    var app = angular.module("myApp", []);

    app.controller('Ctrl', function ($scope, $http) {
        //上传身份证
        $scope.upidcard = function () {
            var data = $scope.message;
            $http({
                method: 'POST',
                data: data,
                headers: {'Content-Type': 'application/x-www-form-urlencoded'},
                transformRequest: function (obj) {
                    var str = [];
                    for (var p in obj) {
                        str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
                    }
                    return str.join("&");
                },
                //url: "/index.php/Home/Login/upidcard"
            }).then(function successCallback(response) {
                console.log(response.data);
                layer.msg(response.data.msg);
                //successHandle(response, function () {
                //window.location.href = "/index.php/Home/Agen/register"
                //});
            }, function errorCallback(response) {
                errorHandle(response);
            });
        }
    })
</script>
</body>
</html>